import request from '../utils/request'
/*获取训练营筛选*/
export const getTrainList = () =>
   request({
     url: '/mobile/camp/public/screen',
     method: 'GET'
   })

/*获取运动筛选*/
export const projectFilter = (data ={}) =>
  request({
    url:'/mobile/sportsCategory/public/list',
    method: 'GET',
    noLoading:true,
    data
  })


/*获取训练营详情*/
export const trainInfo = (data:any) =>
  request({
    url:'/mobile/sports/public/show',
    method:'GET',
    data
  })
/*获取训练营详情*/
export const previousEventsList = (data:any) =>
  request({
    url:'/mobile/img/previous/events/list',
    method:'GET',
    data
  })

/*个人项目报名*/
export const personalRegistry = (data:any) =>
  request({
    url:'/mobile/registration/personal/registry',
    method:'POST',
    data
  })


/*判断本训练营报名*/
export const checkRegistry= () =>
  request({
    url:'/mobile/institutional/checkRegistry',
    method:'GET'
  })
/* 判断个人是否报名 */
export const checkPersonalRegistry = (data:any) =>
  request({
    url:'/mobile/registration/personal/checkRegistry',
    method:'GET',
    data
  })

/*机构信息填写*/
export const teamSigns= (data:any) =>
  request({
    url:'/mobile/institutional/registry',
    method:'POST',
    data
  })

/*校验验证码*/
export const checkCode = (data:any) =>
  request({
    url:'/mobile/institutional/checkCode',
    method:'GET',
    data
  })

/*报名是否通过机构报名*/
export const getIsMechanism = () =>
  request({
    url:'/mobile/registration/personal/isInstitutional',
    method:'GET'
  })


/*团队报名提交*/
export const trainSubmit = (data:any) =>
  request({
    url:'/mobile/registration/institutional/submit',
    method: 'GET',
    data
  })

/*个人订单列表*/
export const personOrderList = (data:any) =>
  request({
    url:'/mobile/registration/person/order/list',
    method:'GET',
    data,
    noLoading:true
  })
export const personOrderInfo = (data:any) =>
  request({
    url:'/mobile/registration/personal/show',
    method:'GET',
    data
  })

/* 个人生成支付订单*/
export const advancePayment = (data:any) =>
  request({
    url:'/mobile/pay/wechat/order',
    method:'POST',
    data
  })
/*检查订单是否支付成功*/
export const playCheck = (data:any) =>
  request({
    url:'/mobile/pay/wechat/transactions',
    method:'GET',
    data
  })
/*附件产品添加*/
export const productsList = (data:any) =>
  request({
    url:'/mobile/product/list',
    method: 'GET',
    data
  })
/*是否有订单*/
export const isPlayProducts = (data:any) =>
  request({
    url:'/mobile/product/hashOrderToPay',
    method:'GET',
    data
  })
/*附加产品详情*/
export const productOrder = (data:any) =>
  request({
    url:'/mobile/product/productOrder',
    method:'GET',
    data
  })
/*生成附加产品订单*/
export const addProductsOrder = (data:any) =>
  request({
    url:'/mobile/product/generateOrderInfo',
    method:'POST',
    data
  })
/*附件产品二次支付*/
export const productPlay = (data:any) =>
  request({
    url:'/mobile/pay/wechat/product',
    method:'GET',
    data
  })
/*附件产品取消订单*/
export const productCancel = (data:any) =>
  request({
    url:"/mobile/product/cancel",
    method:'GET',
    data
  })
/*订单详情*/
export const personOrderShow = (data:any) =>
  request({
    url:'/mobile/registration/person/order/show',
    method:'GET',
    data
  })
/*保险日志*/
export const getInsuranceLog = (data:any) =>
  request({
    url:'/mobile/registration/insurance/log',
    method:'GET',
    data
  })
  /*保险附件修改*/
export const postChangeInsurance = (data:any) =>
  request({
    url:'/mobile/registration/change/insurance',
    method:'post',
    data
  })


/*团队订单列表*/
export const teamOrderList = (data:any) =>
  request({
    url:'/mobile/registration/institutional/order/list',
    method:'GET',
    data,
    noLoading:true
  })

/*团队详情信息*/
export const teamOrderInfo = (data:any) =>
  request({
    url:'/mobile/registration/institutional/order/show',
    method: 'GET',
    data
  })

/*取消团队报名*/
export const cancelSignUp = (data:any) =>
  request({
    url:'/mobile/registration/personal/cancel',
    method:'GET',
    data
  })

/*报名须知*/
export const registrationNoticeInfo = (data:any) =>
  request({
    url:'/mobile/sports/public/notice',
    method:'GET',
    data
  })

/*训练营详情*/
export const trainingCampInfo = (data={}) =>
  request({
    url:'/mobile/camp/public/showNow',
    method:'GET',
    data
  })

/*查看注意事项*/
export const takeCareList = (data={}) =>
  request({
    url:'/mobile/sports/public/manual/list',
    method:'GET',
    data
  })

/*教练详情*/
export const getCoachInfo = (data={}) =>
  request({
    url:'/mobile/coach/public/show',
    method:'GET',
    data
  })

/*图文直播*/
export const getPictureList = (data={}) =>
  request({
    url:'/mobile/img/now/list',
    method:'GET',
    data
  })

/*图文直播点赞*/
export const postLike = (data = {}) =>
  request({
    url:'/mobile/img/likes',
    method:'GET',
    data
  })

/*通过报名项目获取子项*/
export const getEventsItemTree = (data = {}) =>
  request({
    url:'/mobile/eventsItem/tree',
    method:'GET',
    data
  })
/*通过报名项目获取运动项目-期数筛选项*/
export const getEventsPublicScreen = (data = {}) =>
  request({
    url:'/mobile/eventsNumber/public/screen',
    method:'GET',
    data
  })
/*通过报名项目获取运动项目-同分类筛选项*/
export const getEventsPublicSameScreenOne = (data = {}) =>
  request({
    url:'/mobile/sports/public/same/screen',
    method:'GET',
    data
  })
/*报名项目- 退费申请*/
export const postRefundApplication = (data = {}) =>
  request({
    url:'/mobile/refund/application',
    method:'POST',
    data
  })
/*报名项目- 退费申请详情*/
export const postRefundInfo = (data = {}) =>
  request({
    url:'/mobile/refund/application/show',
    method:'GET',
    data
  })
/*报名项目- 退费申请详情*/
export const postRefundCancel = (data = {}) =>
  request({
    url:'/mobile/refund/application/cancel',
    method:'GET',
    data
  })
/*报名项目- 退费申请详情*/
export const getRegistrationList = (data = {}) =>
  request({
    url:'/mobile/refund/application/registration/list',
    method:'GET',
    data
  })

/*图文直播-列表*/
export const getPublicNowList = (data = {}) =>
  request({
    url:'/mobile/img/now/list',
    method:'GET',
    data
  })
